import React from 'react';
import { Link, useRouteMatch } from 'react-router-dom';

import routes from '../../routes/index';

function Error404(props) {
  console.log(props);
  let { url } = useRouteMatch();
  return (
    <div>
      <h1>404 > {url}</h1>
      <ol>
        {routes.map((v, i) => (
          <li key={i}>
            <Link to={v.path}>{v.title}</Link>
          </li>
        ))}
      </ol>
    </div>
  );
}

export default Error404;
